<template>
	<view class="">
		<view class="main-con">反馈内容</view>
		<view class="textarea-con"><textarea class="" v-model="content" value="" placeholder="请输入您要反馈的内容文字信息" /></view>
		
		<view class="upload-con">
			<view class="">
				上传照片
			</view>
			<view class="" style="margin-top: 20rpx;">
				<mix-upload-image img="/static/img/sctp.png"  ref="mixUploadImage" :length="3" :count="3"></mix-upload-image>
			</view>
			
		</view>
		<view class="btn" hover-class="hover-opacity" @click="submit">提交</view>
		<mix-loading v-if="isLoading"></mix-loading>
		<mix-modal-s ref="mixModal" @onConfirm="back"></mix-modal-s>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				content:""
			}
		},
		methods:{
			async submit(){
				const pic=this.$refs.mixUploadImage.imageList.map(item=>item.url);
				if(this.content==""){
					this.$util.msg('请填写反馈内容!');
					return
				}
				const data={
					uid:uni.getStorageSync('uid'),
					content:this.content,
					pic:pic.join('|')
				}
				const res=await this.$request('content/opinion',data,{showLoading:true});
				if(res.result==0){
					this.$refs.mixModal.open();
				}else{
					this.$util.msg(res.resultNote);
				}
			}
		}
		
	}
</script>
<style>
	page{
		background: #FBFAFA;
	}
</style>
<style scoped lang="scss">
.main-con {
	padding: 20rpx;
	line-height:64rpx;
	font-size: 26rpx;
	font-weight: 500;
	color: #333333;
}
.textarea-con{
	width: 100%;
	background: #FFFFFF;
	padding: 20rpx;
}
.textarea {
	height: 246rpx;
	width: 100%;
	font-size: 26rpx;
	font-weight: 500;
	color: #999999;
	
}
.upload-con{
	padding: 100rpx 20rpx;
}
.btn {
	position: fixed;
	bottom: 0;
	width: 100%;
	height: 88rpx;
	line-height: 88rpx;
	text-align: center;
	background: $uni-color-bg;
	font-size: 30rpx;
	font-weight: 500;
	color: #ffffff;
}
</style>
